<template>
	<view class="goods-box"> 
		<text class="goods-name clamp1">认证编号：{{order.order_sn}}</text>
		
		<text class="goods-name clamp1">商品名称：{{goods.name}}</text>
		
		<text class="description" style="margin: 32rpx 0;">生产厂家：{{goods.manufactor}}</text>
		<view style="margin: 20rpx 0;">
			<text class="description">产品参数：</text>
			<view style="display: flex; justify-content: space-between; margin-top: 10rpx;">
				<text class="description">品牌: {{brand.name}}</text>
				<text class="description">型号: {{attr.name}}</text>
			</view>
			<view style="display: flex; justify-content: space-between; margin-top:10rpx;">
				<text class="description">机油分类: {{category.name}}</text> 
			</view>
		</view>
		
		<view style="margin: 20rpx 0;"> 
			<view style="display: flex; justify-content: space-between; margin-top: 10rpx;">
				<text class="description">销售人员: {{salesperson.user_nickname}}</text>
				<text class="description">所属公司: {{salesperson.business}}</text>
			</view>
			<view style="display: flex; justify-content: space-between; margin-top:10rpx;">
				<text class="description">认证时间: {{order.create_time}}</text> 
			</view>
		</view>
	</view>
</template>
<script>
	export default {
		data() {
			return {
				order:{},
				id:0,
				brand:{},
				attr:{},
				category:{},
				salesperson:{},
				goods:{}
			}
		},
		onLoad(options){
			this.id = options.id;
			this.getDatas();
		},
		methods: { 
			getDatas(){
				this.$u.http.get("order/order/detail",{
					id:this.id,
				}).then(res => {
					this.order = res.data;
					this.brand	= res.data.goods.brand
					this.attr	= res.data.goods.attr
					this.category	= res.data.goods.category
					this.salesperson	= res.data.salesperson
					this.goods = res.data.goods;
				})
			},
		}
	}
</script>

<style lang="scss">
	
	.goods-box{
		background-color: #FFFFFF;
		padding: 32rpx;
		position: relative;
		
		.goods-name{
			font-size: 32rpx;
			font-weight: bold;
			margin-top: 24rpx;
		}
		.description{
			color: #666666;
			// margin-top: 18rpx;
			font-size: 24rpx;
			display: block;
			line-height: 1.5;
		}
		.goods-price{
			display: flex;
			flex-direction: row;
			align-items: flex-end;
			.price{
				color: #3c3c3c;
				font-weight: bold;
				font-size: 38rpx;
			}
			.original_price{ text-decoration:line-through; color:#999999; margin:0 16rpx; }
			.specialOffer{
				background-color: #ed3f14;
				color: #FFFFFF;
				padding: 6rpx;
				border-radius: 4rpx;
				font-size: 24rpx;
			}
		}
		.other{
			font-size: 24rpx;
			color: #999999;
			display: flex;
			flex-direction: row;
			justify-content: space-between;
			margin-top: 32rpx;
		}
		
	}
</style>